#pragma once

#include "..\cz_def.h"

#define cz_reg_CreateKeyT								CZ_COMBINET(cz_reg_CreateKey, )
#define cz_reg_DeleteKeyT								CZ_COMBINET(cz_reg_DeleteKey, )
#define cz_reg_DeleteValueT								CZ_COMBINET(cz_reg_DeleteValue, )

#define cz_reg_GetStringT								CZ_COMBINET(cz_reg_GetString, )
#define cz_reg_GetBinaryT								CZ_COMBINET(cz_reg_GetBinary, )
#define cz_reg_GetU32T									CZ_COMBINET(cz_reg_GetU32, )
#define cz_reg_GetU64T									CZ_COMBINET(cz_reg_GetU64, )
#define cz_reg_GetMultiStringT							CZ_COMBINET(cz_reg_GetMultiString, )
#define cz_reg_GetExpandStringT							CZ_COMBINET(cz_reg_GetExpandString, )

#define cz_reg_SetStringT								CZ_COMBINET(cz_reg_SetString, )
#define cz_reg_SetBinaryT								CZ_COMBINET(cz_reg_SetBinary, )
#define cz_reg_SetU32T									CZ_COMBINET(cz_reg_SetU32, )
#define cz_reg_SetU64T									CZ_COMBINET(cz_reg_SetU64, )
#define cz_reg_SetMultiStringT							CZ_COMBINET(cz_reg_SetMultiString, )
#define cz_reg_SetExpandStringT							CZ_COMBINET(cz_reg_SetExpandString, )

// create & delete
bool cz_reg_CreateKeyW(IN HKEY hRootKey, IN wstringc& wcsSubKey);
bool cz_reg_CreateKeyA(IN HKEY hRootKey, IN stringc& strSubKey);

bool cz_reg_DeleteKeyW(IN HKEY hRootKey, IN wstringc& wcsSubKey);
bool cz_reg_DeleteKeyA(IN HKEY hRootKey, IN stringc& strSubKey);

bool cz_reg_DeleteValueW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue);
bool cz_reg_DeleteValueA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue);

// get
bool cz_reg_GetStringW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, OUT wstring& wcsData);
bool cz_reg_GetStringA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, OUT string& strData);

bool cz_reg_GetBinaryW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, OUT vector<u8>& vctData);
bool cz_reg_GetBinaryA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, OUT vector<u8>& vctData);

bool cz_reg_GetU32W(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, OUT u32& data);
bool cz_reg_GetU32A(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, OUT u32& data);

bool cz_reg_GetU64W(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, OUT u64& data);
bool cz_reg_GetU64A(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, OUT u64& data);

bool cz_reg_GetMultiStringW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, OUT vector<wstring>& vctData);
bool cz_reg_GetMultiStringA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, OUT vector<string>& vctData);

bool cz_reg_GetExpandStringW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, OUT wstring& wcsData);
bool cz_reg_GetExpandStringA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, OUT string& strData);

// set
bool cz_reg_SetStringW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, IN wstringc& wcsData);
bool cz_reg_SetStringA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, IN stringc& strData);

bool cz_reg_SetBinaryW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, IN u8c* pData, IN u32 size);
bool cz_reg_SetBinaryA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, IN u8c* pData, IN u32 size);

bool cz_reg_SetU32W(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, IN u32 data);
bool cz_reg_SetU32A(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, IN u32 data);

bool cz_reg_SetU64W(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, IN u64 data);
bool cz_reg_SetU64A(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, IN u64 data);

bool cz_reg_SetMultiStringW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, OUT vector<wstring> const& vctData);
bool cz_reg_SetMultiStringA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, OUT vector<string> const& vctData);

bool cz_reg_SetExpandStringW(IN HKEY hRootKey, IN wstringc& wcsSubKey, IN wstringc& wcsValue, IN wstringc& wcsData);
bool cz_reg_SetExpandStringA(IN HKEY hRootKey, IN stringc& strSubKey, IN stringc& strValue, IN stringc& strData);